package cn.dengta.webapp.im.entity;

import java.util.Date;

import cn.dengta.webapp.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 速配队列
 *
 * @author Ready
 * @since 2022-07-22
 */
@Setter
@Getter
@Accessors(chain = true)
@TableName("im_speed_dating_join_log")
public class SpeedDatingJoinLog extends BaseEntity {

	/** 用户ID */
	private Long userId;
	/** 性别：0=女；1=男 */
	private Integer gender;
	/** 偏好语言 */
	private Integer language;
	/** 速配类型：2=语音速配；3=视频速配；4=视频&语音 */
	private Integer type;
	/** 白名单设置 */
	private Integer whitelist;
	/** 加入队列时间 */
	private Date joinTime;

	public SpeedDatingJoinLog init(SpeedDatingQueue queue) {
		this.userId = queue.getUserId();
		this.gender = queue.getGender();
		this.language = queue.getLanguage();
		this.type = queue.getType();
		this.whitelist = queue.getWhitelist();
		this.joinTime = queue.getJoinTime();
		return this;
	}

	public static final String USER_ID = "user_id";
	public static final String GENDER = "gender";
	public static final String LANGUAGE = "language";
	public static final String TYPE = "type";
	public static final String WHITELIST = "whitelist";
	public static final String JOIN_TIME = "join_time";

}
